package com.wss.service.impl;

import com.wss.dao.VideoTypeDao;
import com.wss.domain.VideoType;
import com.wss.service.VideoTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("videoTypeService")
public class VideoTypeServiceImpl implements VideoTypeService{

    @Autowired
    private VideoTypeDao videoTypeDao;

    @Override
    public List<VideoType> findTypeAll() {
        System.out.println("业务层：查询所有视频类型信息...");
        return videoTypeDao.findTypeAll();
    }

    @Override
    public List<VideoType> findVideoTypeByVthid(int vth_id) {
        System.out.println("业务层：查询根据typeheader划分的视频类型信息...");
        return videoTypeDao.findVideoTypeByVthid(vth_id);
    }

    @Override
    public VideoType findVtypeNameByVtypeid(int vtype_id) {
        System.out.println("业务层：根据vtype_id查询出视频分类名...");
        return videoTypeDao.findVtypeNameByVtypeid(vtype_id);
    }
}
